<?php 
require 'h.php';
$db->query('set names utf8');
$jg=$db->query('select * from t_message order by id desc');
$lynum=$jg->num_rows;


if(empty($_GET["search"])){
    $sql='select * from t_message order by id desc';
} else {
    $searchText=$_GET["search"];
    $sql="select # from t_message where username like '%".$searchText."%' or message like '%".$searchText."%'";
    echo '$sql';
}
$aa=$db->query($sql);
while ($row=$aa->fetch_assoc()){
    $rowlist[]=$row;
}
$aa->free_result();
$db->close();
define('ABC','abc');
require 's.php';
?>

